interface Response {
  code: number;
  msg: string;
  data: any;
}
export function responseSuccess(
  data: any = undefined,
  code: number = 0,
  msg: string = 'success'
): Response {
  return { code, msg, data };
}
export function responseError(
  msg: string = 'error',
  code: number = 200, 
  data: any = undefined
): Response {
  return { code, msg, data };
}

export function responseData(msg: string, code: number, data: any): Response {
  return { code, msg, data };
}
